import importlib
import pkgutil
from typing import Dict

APPLICATION_NAME = 'statistic_mini'


class Profile:
	application_name: str
	port: int
	host: str
	postgres_config: 'PostgresConfig'


class PostgresConfig:
	host: str
	port: int
	username: str
	password: str
	database: str


profiles: Dict[str, 'Profile'] = {
	# 'dev': development_profile,
	# 'prod': production_profile
}

# import all application_*.py
module_name: str = __name__
package_name = module_name.rsplit('.', 1)[0]

package = importlib.import_module(package_name)
package_path = package.__path__

modules = pkgutil.iter_modules(package_path)
for module in modules:
	importlib.import_module(package_name + '.' + module.name)

# print(__name__)

if __name__ == '__main__':
	profiles['a'] = Profile()
	print(profiles['a'])
